<!DOCTYPE html>
<meta charset="utf-8">

<body>
    <script src="../node_modules/d3/dist/d3.js"></script>
    <script src="../node_modules/@hpcc-js/wasm/dist/graphviz.umd.js" type="javascript/worker"></script>
    <script src="../build/d3-graphviz.js"></script>
    <div id="graph" style="text-align: center;"></div>
    <script>

        const graphviz = d3.select("#graph").graphviz()
            .on("initEnd", () => {
                const version = graphviz.graphvizVersion();
                const dot = `digraph  {a [label="Graphviz version: ${version}"]}`;
                graphviz
                    .renderDot(dot);
            });

    </script>